package vn.edu.saigontech.ncms.model.result;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.OptimisticLockType;

import vn.edu.saigontech.ncms.model.BaseEntity;
import vn.edu.saigontech.ncms.model.system.Money;

@Entity
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true, optimisticLock = OptimisticLockType.ALL)
@Table(name = "ncms_placement_test_type")
@SuppressWarnings("serial")
public class PlacementTestType extends BaseEntity {

	@Column(name = "name", nullable = false, unique = true)
	private String name;
	
	@Column(name = "description", length = 4000)
	private String description;

	@Embedded
	@AttributeOverrides( {
			@AttributeOverride(name = "amount", column = @Column(name = "fee")),
			@AttributeOverride(name = "currency", column = @Column(name = "fee_currency")), })
	private Money fee;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Money getFee() {
		return fee;
	}

	public void setFee(Money fee) {
		this.fee = fee;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}